/* preliminary analysis */
/* APPENDIX A2. Descriptives */
proc means means std maxdec=2;  var accept acceptpo acceptpr climatt SES effect;

proc freq;  tables vignet autobezit2 altpol altpro;
run;

/* APPENDIX A3. Measurement control variables */
/* I. climate skepticism */
proc corr alpha;  var op_serious2 op_inevitable op_CO2;

proc corr alpha; var eff_traffic eff_sustainability eff_climate_change;

proc corr alpha; var education est_income income_satisf;

proc freq; tables education est_income income_satisf;
run;

/* APPENDIX A4. Robustness checks: residence and work transportation */
/* I. residence */
proc freq; tables (residence commuting_cat)*autobezit2/chisq nopercent norow; run;
proc freq; tables commuting_cat*residence/chisq; run;


proc means maxdec=2; var accept aceptpo acceptpr; class residence          ;  where u_prop_uni eq 1 and u_consult eq 1 or vignet eq 'control'; run;
proc means maxdec=2; var accept aceptpo acceptpr; class commuting_freq     ;  where u_prop_uni eq 1 and u_consult eq 1 or vignet eq 'control'; run;
proc means maxdec=2; var accept aceptpo acceptpr; class work_transportation;  where u_prop_uni eq 1 and u_consult eq 1 or vignet eq 'control'; run;
proc means maxdec=2; var accept aceptpo acceptpr; class work_distance_cat  ;  where u_prop_uni eq 1 and u_consult eq 1 or vignet eq 'control'; run;

/* randomization checks */
proc freq data=taxes; tables vignet*autobezit2/chisq;
proc glm data=taxes; class vignet; model climatt = vignet; 
proc glm data=taxes; class vignet; model SES     = vignet; 
proc glm data=taxes; class vignet; model effect  = vignet; 

proc glm data=taxes; class vignet; model accept   = vignet;
proc glm data=taxes; class vignet; model acceptpo = vignet; 
proc glm data=taxes; class vignet; model acceptpr = vignet; 
run;

/* FINAL MODELS, Table 4 */
/* testing alternative models for autobezit */
/* residence */
proc glm data=taxes;
 class vignet(ref='control') residence(ref=first) est_income(ref='1');
 model accept = vignet residence climatt SES effect/solution effectsize alpha=0.05;

proc glm data=taxes;
 class vignet(ref='control') residence(ref=first) est_income(ref='1');
 model acceptpo = vignet residence climatt SES effect/solution effectsize alpha=0.05;
 
proc glm data=taxes;
 class vignet(ref='control') residence(ref=first) est_income(ref='1');
 model acceptpr = vignet residence climatt SES effect/solution effectsize alpha=0.05;
run;

/* communtingfreq */
proc glm data=taxes;
 class vignet(ref='control') commuting_cat(ref='1') est_income(ref='1');
 model accept = vignet commuting_cat climatt SES effect/solution effectsize alpha=0.05;
*where work_distance_cat ne -99;

proc glm data=taxes;
 class vignet(ref='control') commuting_cat(ref='1') est_income(ref='1');
 model acceptpo = vignet commuting_cat climatt SES effect/solution effectsize alpha=0.05;
*where work_distance_cat ne -99;
 
proc glm data=taxes;
 class vignet(ref='control') commuting_cat(ref='1') est_income(ref='1');
 model acceptpr = vignet commuting_cat climatt SES effect/solution effectsize alpha=0.05;
*where work_distance_cat ne -99;
run;

